/**
 * 关爱计划自动设置
 *
 * @Author: 殷世杰
 * @Date: 2019/09/19
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询关爱计划列表
export const getCareTaskList = params => axios.get(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/listAutoCarePlan`, { params });
// 删除关爱计划
export const deleteCareTaskList = params => axios.delete(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/deleteAutoCarePlan`, { params });
// 修改关爱计划
export const editCareTaskList = params => axios.post(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/updateAutoCarePlan`, params);
// 新增关爱计划
export const addCareTaskList = params => axios.post(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/insertAutoCarePlan`, params);
// 查询关爱计划明细
export const getCareTaskListById = carePlanId => axios.get(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/${carePlanId}`);
// 根据配置代码查询页面模板配置信息
export const getTemplateConf = confCode => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/pageTemplateConfs/${confCode}`);
// 获取多级车型配置树
export const getAllModel = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/productInfo/productTree`, { params });
// 查询组织下的销售顾问
export const getUserByOrg = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/employees/getSalesman`, { params });
// 查询明细中关爱对象范围(含值)
export const pageTemplateConfs = params => axios.get(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/listPageTemplateConfs`, { params });
// 发布关爱任务
export const releaseCareTask = params => axios.put(`${SERVER.CYXDMS_CUSTOMERCARE}/customercare/carePlan/releaseAutoCarePlan`, params);
